home *** CD-ROM | disk | FTP | other *** search
- Path: newsserver.trl.OZ.AU!usenet
- From: davej@apertus.com
- Newsgroups: rec.games.programmer,comp.programming,comp.lang.c++,alt.msdos.programmer
- Subject: Re: Young programmers read me.
- Date: Fri, 19 Apr 96 13:17:35 EDT
- Organization: Telecom Research Laboratories, Melbourne, Australia.
- Message-ID: <4l71kv$b21@newsserver.trl.OZ.AU>
- References: <4l4ls7$coh@fountain.mindlink.net>
- NNTP-Posting-Host: 172.17.4.125
- Mime-Version: 1.0
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- X-Newsreader: NEWTNews & Chameleon -- TCP/IP for MS Windows from NetManage
-
-
- In article <4l4ls7$coh@fountain.mindlink.net>, <genew@mindlink.bc.ca> writes:
- > davej@apertus.com wrote:
- > >You may "always indent your code properly" but what about when you are
- > >working on a large project with 6 or 20 other engineers? Have you
- > >ever worked on a project where you share development code with others?
- > >What if the company you work for has standards that don't allow your
- > >method?
- > Yes, I have waded through others' code. The big problem is that
- > it is someone else's and not yours i.e. things are not done as you
- > expect.
-
- This is a very strong argument for coding standards.
-
- > Extraneous brackets and such get me wondering if I might have
- > missed something and thus waste time.
- > If the company has different standards? Well, then I can't use
- > my standard there, can I? If it's too much trouble, I'd leave.
-
- You'd leave your job if the company made you put braces around single
- statement conditionals????
-
- > Let me reverse the question. Suppose the company insists that you do
- > things my way. What do you do?
-
- Do things your way. IMO, one of the top abilities in a programmer is
- being flexible. If you can't read either style, quickly, you're going
- to miss a lot of deadlines. This also promotes good teamwork as every
- piece of code you pick up will be similar in structure and flow - saves
- time and energy for everybody.
-
- It still remains my opinion that the extra braces may eliminate future
- unforseen problems, agreed basically due to carelessness, but they do happen.
- If the company said "don't use 'em", I'd state my case and do what they
- told me - they own the code I write, not me.
-
- > >IMO, if you're relying on indentation to indicate program flow, you're
- > >just asking for trouble, and lots of it.
- >
- > Why? Since I rarely use gotos, the indentation does a fine job
- > of showing the flow. Did you mean something else?
-
- No, just that indentation is great for readability but doesn't mean much
- to a compiler, at least in C.
-
- > I follow my standard very strictly. It is not a complicated one
- > and it is usable on multiple languages.
- > Anything can be screwed up. (Fools are so ingenious.) I refuse
- > to take responsibility for someone else mucking up my code later. I
- > do not write obfuscated code and if the maintainer can not read clear
- > code, he shouldn't be modifying it. I particularly refuse to take
- > responsibility for a future supporter so bad that he can't balance
- > braces. That's the least of his worries in a real program.
-
- I guess I read this as you don't like to work in teams and are very
- possessive about your code.
-
- > >> Extraneous braces cause pause.
- > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- > >???
- >
- > It takes time, a bit, but still time, to realize that the braces
- > are extraneous.
-
- Ahhh, I misunderstood the "cause pause". I thought you were referring
- to some runtime pause, not a comprehension/readability pause. Sorry.
-
- > I would hate to have to maintain garbage like the above and would
- > change it as soon as I could to save myself time and trouble.
-
- I once thought that way. It was my first job out of college 11 years
- ago. I learned to adapt and become flexible, it just made my work life
- easier.
-
- Cheers,
- Dave Johnson
-